package com.tiankong.coupon.feign;

import com.tiankong.coupon.dto.SpuCouponInfo;
import com.tiankong.coupon.service.SpuBoundsService;
import net.youdi.common.model.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: scl
 * @date: 2021-08-06 14:45
 * @description
 */
@RestController
public class CouponServer {

    @Autowired
    private SpuBoundsService spuBoundsService;

    /**
     * spu积分及sku优惠信息保存
     * @param spuCouponInfo
     * @return
     */
    @PostMapping("spu/coupon/info/save")
    public Result saveCoupon(@RequestBody SpuCouponInfo spuCouponInfo){
        spuBoundsService.saveCoupon(spuCouponInfo);
        return Result.ok();
    }

}
